/* 
应用根组件
*/
import React, { Component } from 'react'
import { HashRouter, Route, Switch, Redirect } from 'react-router-dom'

import Login from './pages/User/Login/Login'
import Register from './pages/User/Register/Register'
import Forget from './pages/User/Forget/Forget'
import ResumeTemplate from './pages/Resume/children/ResumeTemplate/ResumeTemplate'
import Admin from './pages/Admin/Admin'

import memory from './utils/memory'
import storage from './utils/storage'

export default class App extends Component {
    render() {
        memory.user = storage.user.get()
        return (
            <HashRouter>
                <Switch>
                    <Route path="/resumeTemplate" component={ResumeTemplate}></Route>
                    <Route path="/login" component={Login}></Route>
                    <Route path="/register" component={Register}></Route>
                    <Route path="/forget" component={Forget}></Route>
                    <Route path="/" component={Admin}></Route>
                    <Redirect to="/login"></Redirect>
                </Switch>
            </HashRouter>
        )
    }
}
